import {ProcedureBase} from "./ProcedureBase";
import {IFsmManager} from "../Fsm/IFsmManager";
import GameFrameworkModule from "../Base/GameFrameworkModule";

export interface IProcedureManager {
    /// <summary>
    /// 获取当前流程。
    /// </summary>
    CurrentProcedure(): ProcedureBase


/// <summary>
/// 获取当前流程持续时间。
/// </summary>
    CurrentProcedureTime(): number;

/// <summary>
/// 初始化流程管理器。
/// </summary>
/// <param name="fsmManager">有限状态机管理器。</param>
/// <param name="procedures">流程管理器包含的流程。</param>
    Initialize(fsmManager: IFsmManager&GameFrameworkModule, procedures: ProcedureBase[]): void;

/// <summary>
/// 开始流程。
/// </summary>
/// <typeparam name="T">要开始的流程类型。</typeparam>
    StartProcedure<T extends ProcedureBase>(type: { prototype: T }): void;


/// <summary>
/// 是否存在流程。
/// </summary>
/// <typeparam name="T">要检查的流程类型。</typeparam>
/// <returns>是否存在流程。</returns>
    HasProcedure<T extends ProcedureBase>(type: { prototype: T }): boolean;


/// <summary>
/// 获取流程。
/// </summary>
/// <typeparam name="T">要获取的流程类型。</typeparam>
/// <returns>要获取的流程。</returns>
    GetProcedure<T extends ProcedureBase>(type: { prototype: T }): ProcedureBase;

}